/*
 * @Description:
 * 
 * @Author: rendc
 * 
 * @Date: 2025-08-12 11:46:21
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2025-08-12 11:50:33
 */

import java.util.ArrayList;
import java.util.List;

public class Test04 {

  /**
   * @param args
   */
  public static void main(String[] args) {
    //
    List<String> oldList = new ArrayList<>();
    List<String> newList = new ArrayList<>();

    oldList.add("1");
    oldList.add("2");
    oldList.add("3");
    oldList.add("4");
    oldList.add("4");
    for (String string : oldList) {
      if (!newList.contains(string)) {
        newList.add(string);
      }
    }
    System.out.println(oldList);
    System.out.println(newList);
  }

}